package rabbitmq

import "github.com/streadway/amqp"

// 队列名
const (
	ARTICLE = "article"
)

// 队列配置
type Queue struct {
	exchangeName string
	name         string
	durable      bool
	autoDelete   bool
	exclusive    bool
	nowWait      bool
	args         amqp.Table
}

// 队列配置列表
var QuenuList = map[string]Queue{
	ARTICLE: {
		exchangeName: " ",
		name:         "article_queue",
		durable:      true,
		autoDelete:   false,
		exclusive:    false,
		nowWait:      false,
		args:         nil,
	},
}

// 交换机名
const (
	EX_ARTICLE = "ex_article"
)

// 交换机配置
type Exchange struct {
	name       string
	type1      string //direct直连交换机, topic主题交换机, headers头交换机 和fanout扇型交换机
	durable    bool
	autoDelete bool
	internal   bool
	noWait     bool
	args       amqp.Table
}

// 交换机配置列表
var ExchangeList = map[string]Exchange{
	EX_ARTICLE: {
		name:       "logs",
		type1:      "fanout",
		durable:    true,
		autoDelete: false,
		internal:   false,
		noWait:     false,
		args:       nil,
	},
}
